<template>
  <div>
    <vCommonPage :title="$route.query.pageTitle">
      <div slot="customContent">
        <!-- start:自定义页面内容 -->
        <el-row :gutter="20">
          <el-col :span="sceneid==='sstbg'?'12':''" v-for="(item, index) in payments" :key="index">
              <el-image
              style="width: 303px; height: 143px"
              :src="item.iconUrl "
              fit="fill"
              @click="nextStep(item.id)">
              </el-image>
          </el-col>
        </el-row>
        <!-- end:自定义页面内容 -->
         <vUser />
      </div>
    </vCommonPage>
  </div>
</template>
<script>
// 业务事项的图标
import alipayUrl from '@images/payments/alipay.png'
import wechatpayUrl from '@images/payments/wechat.png'
import bankcardUrl from '@images/payments/bankcard.png'
import cashUrl from '@images/payments/cash.png'
import { appointent, recipel} from '@js/mixins'
export default {
  mixins:[appointent, recipel],
  data() {
    return {
      sceneid:this.$store.state.terminfo.seceninfo.sceneid,
      payments: [  //支付方式配置内容
        {
          id: "ali",
          name: "支付宝",
          iconUrl: alipayUrl,
        },
        {
          id: "wx",
          name: "微信支付",
          iconUrl: wechatpayUrl,
        },
        // {
        //   id: "pos",
        //   name: "银行卡",
        //   iconUrl: bankcardUrl,
        // },
        // {
        //   id: "cash",
        //   name: "现金",
        //   iconUrl: cashUrl,
        // }              
      ]
    };
  },
  methods: {
    nextStep(id){
      if(id=="pos"||id=="cash"){
         this.$alert("该支付方式暂未开通，请选择支付宝或者微信支付");
      }
      else{
        // this.$router.push({ name: "qrcode",  query:{from: id}});
      
         this.$router.push({ name: "barcode",  query:{from: id}});
      }

    }
  },
  computed: {
    backTo(){
      return this.$route.query.from
    }
  },
  components: {
  },
  mounted(){

  }
};
</script>
<style scoped>
  .el-row {
    padding: 0 60px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }
  .el-col {
    position: relative;
    box-sizing: border-box;
    margin: 30px 0;
    width: 380px;
    text-align: center;
  }
</style>